home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7922 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: solon.com!not-for-mail
  2. From: seebs@solutions.solon.com (Peter Seebach)
  3. Newsgroups: comp.lang.pl1,comp.lang.c
  4. Subject: Re: PL/I and C
  5. Date: 29 Feb 1996 12:08:36 -0600
  6. Organization: Usenet Fact Police (Undercover)
  7. Message-ID: <4h4q34$bjh@solutions.solon.com>
  8. References: <4gh5ru$eng@goanna.cs.rmit.EDU.AU> <TANMOY.96Feb23212936@qcd.lanl.gov> <4h0gn2$mnk@wizvax.wizvax.net> <TANMOY.96Feb28084301@qcd.lanl.gov>
  9. NNTP-Posting-Host: solutions.solon.com
  10.  
  11. In article <TANMOY.96Feb28084301@qcd.lanl.gov>,
  12. Tanmoy Bhattacharya <tanmoy@qcd.lanl.gov> wrote:
  13. >RS: Last I knew the size of an int was compiler dependent.
  14.  
  15. >Last I knew, every type (other than bit field) in C had a `compiler
  16. >dependent' size. 
  17.  
  18. If you mean in terms of sizeof(), you are wrong - char, signed char, and
  19. unsigned char have compiler independant size.
  20.  
  21. If you mean in terms of real storage, you are wrong - bitfields may vary in
  22. real size, because they may be padded.  (I think.)  Consider
  23.     struct foo {
  24.         int bar:15, baz:15, quux:15;
  25.     };
  26.  
  27. >I fail to see what this has to do with the validity of arrays in
  28. >struct. 
  29.  
  30. Well, that's comforting, I can't tell either.
  31.  
  32. -s
  33. -- 
  34. Peter Seebach - seebs@solon.com - Copyright 1996 Peter Seebach.
  35. C/Unix wizard -- C/Unix questions? Send mail for help.  No, really!
  36. FUCK the communications decency act.  Goddamned government.  [literally.]
  37. The *other* C FAQ - http://www.solon.com/~seebs/c/c-iaq.html
  38.